<!--
;*** Revised for uBook2008

;*** Any non color field in [options] section is a user customizable option:
;***   Variable_Name=Choice_zero_Label,Choice_One_Label,Choice_text,Value
;*** The current state of the [options] section can be found in uBook.ini
;*** under the [skin_name] section

[options]
TEXT_COLOR=0,0,0
BCK_COLOR=255,255,255
LINK_COLOR=32,64,224
SELECT_COLOR=224,64,24
HIGH_COLOR=0,255,0
SEPARATOR_COLOR=0,128,255
SEARCH_COLOR=255,128,128
3DL_COLOR=32,32,32
3DB_COLOR=32,32,32
3DR_COLOR=164,164,164
3DT_COLOR=164,164,164
TwoColumns="One","Two","Columns",0
ShowPercent="Page Number","Percent","",0

[skin]
;*** First a few global flags:

;*** FLAGS can be a combination (+) of:
;***       FULL or CLIENT: if FULL is selected, the Windows caption and border disappears
;***       PREP: if defined, the skin is saved as a bitmap in memory for faster drawing.
;***             Although it will use more memory.  Some skins do not work unless 'PREP'ed.
;***       NOCLEAR: if the skin has solid coverage for all the display, defining this
;***                flag accelerate drawing by disabling the clearing of the surface at each repaint
;***       TEST: if defined, a colored rectangle (text color) will be shown around each zone.
FLAGS=FULL+PREP

;*** MIN is minimum width and height for a window using this skin.
MIN=240,320

;*** RES defines a bitmap file (in same directory as the usk file) where all the
;***     patterns can be found.  Anu number of res file is allowed, but only one per zone.
;***     Sub-regions of a bitmap can be used independantly.  This file can be
;***     BMP, GIF, PNG or JPG.  This applies to the following zones in the skin
RES=SPACED.PNG

;*** A series of "tags" field can be defined to override certain symbol on the page number, .
;*** percent fields.  Here's what they are and their default values:
;***     LEFT="«"               ;previous page
;***     UP=                    ;previous book in folder
;***     FLEFT="««"             ;fast previous page
;***     PDIV=" / "             ;page count divider
;***     RIGHT="»"              ;next page
;***     DOWN=                  ;next book in folder
;***     FRIGHT="»»"            ;fast next page
;***     PRIGHT="+"             ;still paginating mark
;***     TEXT="Text"            ;overlay close indicator
;***     WAIT="..."             ;working indicator

LEFT="× "
UP="Ù "
FLEFT="×ª"
PDIV=" / "
RIGHT=" Ø"
DOWN=" Ú"
FRIGHT="ªØ"
PRIGHT=" ½"
TEXT="g"
WAIT="«««"

;*** A series of 5 custom menus (MENU1 - MENU5) can be built by defining a 
;*** string with a comma separated list of menu item name.  Each menu list 
;*** has to associate with a zone of similar name later on.

;*** Menu items can be:
;***    RECENT      recent file sub menu
;***    OPEN        open file view
;***    OPTIONS     options view
;***    ABOUT       about uBook
;***    HELP        help file view
;***    EXIT        quit uBook
;***    COVER       book cover view
;***    TOC         table of content view and control items
;***    MARKS       annotations view and control items
;***    STACK       back and forward menu items
;***    MINMAX      for skin with min max controls, adds menu items
;***    PAGE        page control items (first, last, page...)
;***    FIND        find controls
;***    LOOKUP      dictionary access
;***    AUTO        auto scroll
;***    CELL        image annotation controls
;***    EXTERNAL    all external commands defined in External.ini
;***    *           separator

MENU1="STACK,*,TOC,*,MARKS"
MENU2="COVER,*,PAGE,*,FIND,LOOKUP"
MENU3="RECENT,OPEN,*,EXTERNAL,*,OPTIONS,AUTO,*,ABOUT,HELP,*,EXIT"

;*** Then comes zones, one by one.  Note that they are evaluated in the order
;*** they are read (i.e. top to bottom) and it is possible to list a zone
;*** twice, the second occurence will complete or overwrite the first one. 
;***
;*** Note also that parameters, when numeric, can be a valid arithmetic
;*** equation using the following operators (from high to low priority):
;***  ( ) NUMBER CONSTANT [ZONE.]VARIABLE
;***  + - (unary)
;***  * / % (modulus)
;***  + -
;*** The following boolean operators are also available:
;***  ! (unary not)
;***  & (logical and)
;***  | (logical or)
;***  =, !=, <, >, <= and >=
;*** the result is one for TRUE and 0 for FALSE
;***
;*** VAR=variable:expression 
;***    this can be used to evaluate complex expression and store the result in the
;***    given named variable.  Note that the evaluation is done right away so can only use
;***    data from lines above it.
;***
;*** CONSTANT are cw and ch, the width and height of the canvas.  There is also a PLATFORM
;***          constant that is 1 for PC, 2 for Pocket PC and 3 for Handheld PC
;***          Non color entries in the [options] section can also be used as constants
;***          their current value (0 or 1) defined by the user.
;*** VARIABLE are fh for the font height and x, y, w, h for the position and size of the zone.
;***          If no zones if specified the variable of the current zone being defined is taken.
;***          Fields defined by the VAR command can also be used.
;*** FUNCTIONS only sc(n) is defined and applies the current skin scaling to the given number n
;*** 
;*** Zones have the following fields
;*** ZONE marks the start of a new zone (or the completion of a previosuly defined one)
;***      There are three sub-fields (separted by commas), the last one optional:
;***      name,type[,flags]
;***      Name is any character string, not already a reserved word.
;***      Type define the role of the zone and it can be:
;***        TITLE : caption where book title appears
;***        PAGE : a book text zone
;***        TIME : current local time
;***        MENUBOOK, MENUMARKS, MENUSECTION : one of the three uBook menu
;***        PREVPAGE, NEXTPAGE : zone that moves to next or previous page when clicked
;***        PAGEPERCENT : zone that behaves like MENUSECTION but show a percentage completion of book
;***        PAGERANGE : zone that show only the current page range
;***        PAGERANGEPERCENT : zone that show only the current page range in percentage
;***        T, B, L, R : a sizing border (top, bottom, left, right)
;***        TL, TR, BL, BR : a sizing corner
;***        MAXIMIZE, MINIMIZE, CLOSE : a window control button
;***        STATIC : purely estethic
;***        COVER : cover page area
;***        BACK, FORWARD : go to previous / next location on document stack
;***        PREVSECT, NEXTSECT : go to previous / next table of content entry
;***        PREVMARK, NEXTMARK : go to previous / next annotation
;***      Flags can be a combination of:
;***        FILL : forces the blanking of the zone background with the user selected
;***               background color.
;***        ONPATTERN : Indicates that this zones has a background pattern and that.
;***                    Characters drawn on it should use the pattern AA function.
;***                    Note that this is required because the pattern might be coming
;***                    from another zone than this one, because overlap is allowed.
;***        SHADE : this zone whill merge it foregroung color half with whatever
;***                background color is underneath at drawing time.
;***        SIDE_L, SIDE_R, SIDE_T, SIDE_B : draw a border (in FORE color) on the specified side
;***                                         Left, Right, Top or Bottom.
;***        SIDE_3D : when mixed with SIDE_* will use the 3D colors instead.
;***        OVER : use OVER color instead of FORE
;***
;*** SIZE is width and height of zone and has two expression sub-fields, w and h
;*** POS is the zone upper left corner position and has two expression sub-fields, x and y
;*** PATTERN defines a region from the RES file to draw in the zone.  It has five
;***         sub-fields: x, y, w and h position of pattern in RES file and the fifth
;***         one is a set of flags, which can be selected from:
;***           FLIPW, FLIPH : flips the zone when drawing it.
;***           TILEW, TILEH : instead of stretching the pattern, repeat it
;***                          in the specified direction.  Note that if flipping
;***                          and tiling are defined, each repeating occurence
;***                          will be flipped, creating a continuous pattern.
;***           FULLPATTERN : instead of taking the w and h parameters, take
;***                         the dimensions in the current res file.
;*** FONT has four sub-fields.  The font name, size, flags and extra bolding.  Flags can be a combination
;***      of the following:
;***        NORMAL, BOLD, ITALIC : font style
;***        CENTER, LEFT, RIGHT : horizontal justification
;***        TOP, BOTTOM, VCENTER : vertical justification
;***        R0, R90, R180, R270 : text rotation
;***      font name can be: Times, Arial, Courier or Symbols
;*** LABEL has one item, a text string.  Note that the zone SIZE will be computed/recomputed
;***       using the label text and font used.  If no font has been defined previously,
;***       the current user selected font will be used.
;*** BACK, OVER and FORE each have three fields, r, g and b and define the background and text color.

;*** To see the content of the Symbol font set, open this file as an HTML file from uBook:
;-->
;33:<FONT FACE=SYMBOLS>&#33;&#34;&#35;&#36;&#37;&#38;&#39;</FONT><BR>
;40:<FONT FACE=SYMBOLS>&#40;&#41;&#42;&#43;&#44;&#45;&#46;&#47;&#48;&#49;</FONT><BR>
;50:<FONT FACE=SYMBOLS>&#50;&#51;&#52;&#53;&#54;&#55;&#56;&#57;&#58;&#59;</FONT><BR>
;60:<FONT FACE=SYMBOLS>&#60;&#61;&#62;&#63;&#64;&#65;&#66;&#67;&#68;&#69;</FONT><BR>
;70:<FONT FACE=SYMBOLS>&#70;&#71;&#72;&#73;&#74;&#75;&#76;&#77;&#78;&#79;</FONT><BR>
;80:<FONT FACE=SYMBOLS>&#80;&#81;&#82;&#83;&#84;&#85;&#86;&#87;&#88;&#89;</FONT><BR>
;90:<FONT FACE=SYMBOLS>&#90;&#91;&#92;&#93;&#94;&#95;&#96;&#97;&#98;&#99;</FONT><BR>
;100:<FONT FACE=SYMBOLS>&#100;&#101;&#102;&#103;&#104;&#105;&#106;&#107;&#108;&#109;</FONT><BR>
;110:<FONT FACE=SYMBOLS>&#110;&#111;&#112;&#113;&#114;&#115;&#116;&#117;&#118;&#119;</FONT><BR>
;120:<FONT FACE=SYMBOLS>&#120;&#121;&#122;&#123;&#124;&#125;&#126;&#127;&#128;&#129;</FONT><BR>
;130:<FONT FACE=SYMBOLS>&#130;&#131;&#132;&#133;&#134;&#135;&#136;&#137;&#138;&#139;</FONT><BR>
;140:<FONT FACE=SYMBOLS>&#140;&#141;&#142;&#143;&#144;&#145;&#146;&#147;&#148;&#149;</FONT><BR>
;152:<FONT FACE=SYMBOLS>&#152;&#153;&#154;&#155;&#156;&#157;&#158;&#159;</FONT><BR>
;161:<FONT FACE=SYMBOLS>&#161;&#162;&#163;&#164;&#165;&#166;&#167;&#168;&#169;</FONT><BR>
;170:<FONT FACE=SYMBOLS>&#170;&#171;&#172;&#173;&#174;&#175;&#176;&#177;&#178;&#179;</FONT><BR>
;180:<FONT FACE=SYMBOLS>&#180;&#181;&#182;&#183;&#184;&#185;&#186;&#187;&#188;&#189;</FONT><BR>
;190:<FONT FACE=SYMBOLS>&#190;&#191;&#192;&#193;&#194;&#195;&#196;&#197;&#198;&#199;</FONT><BR>
;200:<FONT FACE=SYMBOLS>&#200;&#201;&#202;&#203;&#204;&#205;&#206;&#207;&#208;&#209;</FONT><BR>
;210:<FONT FACE=SYMBOLS>&#210;&#211;&#212;&#213;&#214;&#215;&#216;&#217;&#218;&#219;</FONT><BR>
;220:<FONT FACE=SYMBOLS>&#220;&#221;&#222;&#223;&#224;&#225;&#226;&#227;&#228;&#229;</FONT><BR>
;230:<FONT FACE=SYMBOLS>&#230;&#231;&#232;&#233;&#234;&#235;&#236;&#237;&#238;&#239;</FONT><BR>
;240:<FONT FACE=SYMBOLS>&#240;&#241;&#242;&#243;&#244;&#245;&#246;&#247;&#248;&#249;</FONT><BR>
;250:<FONT FACE=SYMBOLS>&#250;&#251;&#252;&#253;&#254;&#255;</FONT><BR>
<!--


;**** Borders
ZONE=SzRight,R
SIZE=2,ch
POS=cw-2,0
BACK=224,224,224

ZONE=SzLeft,L
SIZE=2,ch
POS=0,0
BACK=224,224,224

ZONE=SzBottom,B
SIZE=cw,2
POS=0,ch-2
BACK=224,224,224

ZONE=SzTop,T
SIZE=cw,2
POS=0,0
BACK=224,224,224

;**** Footer
ZONE=CsFootL,STATIC
POS=2,ch-sc(30)-2
SIZE=sc(68),sc(30)
PATTERN=0,24,68,30,0

ZONE=CsFootM,STATIC
POS=CsFootL.x+CsFootL.w,ch-sc(30)-2
SIZE=sc(56),sc(30)
PATTERN=68,24,56,30,0

ZONE=CsFootR,STATIC
POS=CsFootM.x+CsFootM.w,ch-sc(30)-2
SIZE=cw-x-2,sc(30)
PATTERN=124,24,16,30,TILEW

ZONE=DcPrev,BACK,ONPATTERN
FONT=Symbols,-16,NORMAL
LABEL="÷"
POS=CsFootM.x+2,ch-sc(18)-2
FORE=96,96,96

IF=ShowPercent=0
ZONE=PgSection,PAGERANGE,ONPATTERN
ELSE
ZONE=PgSection,PAGERANGEPERCENT,ONPATTERN
ENDIF
FONT=Symbols,-16,NORMAL+CENTER,2
LABEL="0/0"
POS=DcPrev.x+DcPrev.w+2,ch-sc(18)-2
SIZE=cw-x-4,h
FORE=96,96,96

;**** Menus
ZONE=MnStart,MENU3
FORE=0,0,0
POS=2+sc(2)-1,ch-sc(18)-2
SIZE=sc(20)+1,sc(18)

ZONE=MnPage,MENU2
FORE=0,0,0
POS=2+sc(23)-1,ch-sc(18)-2
SIZE=sc(20)+1,sc(18)

ZONE=MnGo,MENU1
FONT=Times,5,NORMAL+CENTER
FORE=0,0,0
POS=2+sc(44)-1,ch-sc(18)-2
SIZE=sc(20)+1,sc(18)


;**** Header
VAR=hd:24
VAR=mmf:((hd-6)/2)
VAR=mf:(hd-6)

ZONE=CsHeader,STATIC
POS=2,2
SIZE=cw-4,sc(24)
PATTERN=0,0,140,24,TILEW

ZONE=WmMax,MAXIMIZE,ONPATTERN
FONT=Arial,-mmf,CENTER+VCENTER
LABEL=" + "
POS=cw-w-4,4
SIZE=w,sc(mmf)
FORE=224,224,224

ZONE=WmMin,MINIMIZE,ONPATTERN
FONT=Arial,-mmf,CENTER+VCENTER
LABEL="–"
POS=WmMax.x,4+sc(mf)-WmMax.h
SIZE=WmMax.w,sc(mmf)
FORE=96,96,96


ZONE=PgTime,TIME,ONPATTERN
FONT=Arial,-mf,NORMAL,2
LABEL="99:99"
POS=WmMax.x-w-2,4
FORE=224,224,224

ZONE=PgTitle,TITLE,ONPATTERN
FONT=Arial,-mf,ITALIC
LABEL="µBook"
POS=4,4
SIZE=PgTime.x-x,h
FORE=224,224,224


;**** Page
IF=TwoColumns=0
ZONE=PgPage,PAGE
SIZE=cw-cw/16,ch-CsFootL.h-CsHeader.h
POS=cw/32,CsHeader.h
ELSE
ZONE=PgPage1,PAGE
SIZE=cw/2-cw/16,ch-CsFootL.h-CsHeader.h
POS=cw/32,CsHeader.h

ZONE=PgPage2,PAGE
SIZE=cw/2-cw/16,ch-CsFootL.h-CsHeader.h
POS=cw/2+cw/32,CsHeader.h
ENDIF

ZONE=PgCover,COVER
IF=TwoColumns=0
SIZE=cw-4,PgPage.h
POS=2,PgPage.y
ELSE
SIZE=cw-4,PgPage1.h
POS=2,PgPage1.y
ENDIF

;**** Resize Corners
ZONE=SzTopLeft,TL
SIZE=16,16
POS=0,0

ZONE=SzTopRight,TR
SIZE=16,16
POS=cw-16,0

ZONE=SzBottomLeft,BL
SIZE=16,16
POS=0,ch-16

ZONE=SzBottomRight,BR
SIZE=16,16
POS=cw-16,ch-16

;*** MESSAGE display skin
;*** The msg-skin can be over-written here
;*** basic skins are in uBook.usk
[msg-skin]
FLAGS=CLIENT+NOCLEAR
MIN=240,320

ZONE=SzRight,R
SIZE=2,ch
POS=cw-2,0
BACK=224,224,224

ZONE=SzLeft,L
SIZE=2,ch
POS=0,0
BACK=224,224,224

ZONE=SzBottom,B
SIZE=cw,2
POS=0,ch-2
BACK=224,224,224

ZONE=SzTop,T
SIZE=cw,2
POS=0,0
BACK=224,224,224

ZONE=PgTitle,STATIC
FONT=Arial,3,ITALIC+CENTER
LABEL="µBook"
SIZE=cw-4,h
POS=2,2
BACK=64,64,64
FORE=192,192,192

ZONE=PgBack,STATIC
BACK=255,255,255
POS=2,PgTitle.y+PgTitle.h
SIZE=cw-4,ch-2-y

ZONE=PgPage,PAGE,ONPATTERN
SIZE=PgBack.w,PgBack.h
POS=PgBack.x,PgBack.y


;*** CURSOR control skin
;*** this skin is meant to be overlayed (temporarily) on the main skin

[crs-skin]
FLAGS=CLIENT+NOCLEAR
MIN=64,64

;innner square
VAR=w0:64
VAR=h0:64
VAR=w1:sc(w0)
VAR=h1:sc(h0)

;outer square
VAR=ws0:72
VAR=hs0:72
VAR=ws1:sc(ws0)
VAR=hs1:sc(hs0)

ZONE=CrsBgn,STATIC,SHADE
POS=(cw-ws1)/2,(ch-hs1)/2
FONT=Symbols,-hs0,NORMAL+CENTER+VCENTER
FORE=0,0,0
SIZE=ws1,hs1

ZONE=CrsStick,STATIC,ONPATTERN
POS=(cw-w1)/2,(ch-h1)/2
FONT=Symbols,-20,NORMAL+CENTER+TOP
LABEL="°"
FORE=255,255,255
OVER=0,255,42
SIZE=w1,h1

ZONE=CrsLeft,STATIC,ONPATTERN
POS=(cw-w1)/2,(ch-h1)/2
FONT=Symbols,-20,NORMAL+LEFT+VCENTER
LABEL="™"
FORE=255,255,255
OVER=0,255,42
SIZE=w1,h1

ZONE=CrsCenter,STATIC,ONPATTERN+OVER
POS=(cw-w1)/2,(ch-h1)/2
FONT=Symbols,-16,NORMAL+CENTER+VCENTER
LABEL="¯"
FORE=255,255,255
OVER=0,255,42
SIZE=w1,h1

ZONE=CrsRight,STATIC,ONPATTERN
POS=(cw-w1)/2,(ch-h1)/2
FONT=Symbols,-20,NORMAL+RIGHT+VCENTER
LABEL="˜"
FORE=255,255,255
OVER=0,255,42
SIZE=w1,h1

ZONE=CrsCancel,STATIC,ONPATTERN
POS=(cw-w1)/2,(ch-h1)/2
FONT=Symbols,-18,NORMAL+CENTER+BOTTOM
LABEL="€"
FORE=255,145,135
OVER=255,39,20
SIZE=w1,h1

;-->
